#include <stdio.h>

int add(int x, int y)
{
	int temp;

	temp = x + y;
	return temp;
}

int main()
{
	add(1, 3);
}


#if 0

/*
 * intel
 */
0000000000001129 <add>:
    1129:	f3 0f 1e fa          	endbr64 
    112d:	55                   	push   %rbp
    112e:	48 89 e5             	mov    %rsp,%rbp
    1131:	89 7d ec             	mov    %edi,-0x14(%rbp)	// (rbp-0x14)=edi
    1134:	89 75 e8             	mov    %esi,-0x18(%rbp)	// (rbp-0x18)=esi
    1137:	8b 55 ec             	mov    -0x14(%rbp),%edx	// edx=(rbp-0x14)
    113a:	8b 45 e8             	mov    -0x18(%rbp),%eax	// eax=(rbp-0x18)
    113d:	01 d0                	add    %edx,%eax	// eax+=edx
    113f:	89 45 fc             	mov    %eax,-0x4(%rbp)	// (rbp-0x4)=eax
    1142:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax=(rpb-0x4)
    1145:	5d                   	pop    %rbp
    1146:	c3                   	retq   

0000000000001147 <main>:
    1147:	f3 0f 1e fa          	endbr64 
    114b:	55                   	push   %rbp
    114c:	48 89 e5             	mov    %rsp,%rbp
    114f:	be 03 00 00 00       	mov    $0x3,%esi	// esi=0x3
    1154:	bf 01 00 00 00       	mov    $0x1,%edi	// edi=0x1
    1159:	e8 cb ff ff ff       	callq  1129 <add>	// add(edi, esi)
    115e:	b8 00 00 00 00       	mov    $0x0,%eax
    1163:	5d                   	pop    %rbp
    1164:	c3                   	retq   
    1165:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    116c:	00 00 00 
    116f:	90                   	nop

/*
 * arm
 */
000000000040051c <add>:
  40051c:	d10083ff 	sub	sp, sp, #0x20
  400520:	b9000fe0 	str	w0, [sp, #12]	// [sp+12]=w0
  400524:	b9000be1 	str	w1, [sp, #8]	// [sp+8]=w1
  400528:	b9400fe1 	ldr	w1, [sp, #12]	// w1=[sp=12]
  40052c:	b9400be0 	ldr	w0, [sp, #8]	// w0=[sp+8]
  400530:	0b000020 	add	w0, w1, w0	// w0=w1+w0
  400534:	b9001fe0 	str	w0, [sp, #28]	// [sp+28]=w0
  400538:	b9401fe0 	ldr	w0, [sp, #28]	// w0=[sp+28]
  40053c:	910083ff 	add	sp, sp, #0x20
  400540:	d65f03c0 	ret

0000000000400544 <main>:
  400544:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  400548:	910003fd 	mov	x29, sp
  40054c:	52800061 	mov	w1, #0x3                   	// #3
  400550:	52800020 	mov	w0, #0x1                   	// #1
  400554:	97fffff2 	bl	40051c <add>	// add(w0, w1)
  400558:	52800000 	mov	w0, #0x0                   	// #0
  40055c:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400560:	d65f03c0 	ret
  400564:	00000000 	.inst	0x00000000 ; undefined

#endif
